package com.yh.csx.crm.service.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * StartTempCreditApprovalReq class
 *
 * @author huyalin
 * @date 2019/2/28
 */
@Data
@ToString
public class StartTempCreditApprovalReq {

    @Min(value = 1, message = "客户id不正确")
    @ApiModelProperty("客户ID")
    private Long customerId;

    @Min(value = 0, message = "额度不能是0或负数")
    @ApiModelProperty("调整额度")
    private BigDecimal tempCredit;

    @NotNull(message = "生效时间不能为空")
    @ApiModelProperty("生效时间yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date beginDate;

    @NotNull(message = "失效时间不能为空")
    @ApiModelProperty("失效时间yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date endDate;

    @ApiModelProperty("调整原因")
    private String reason;

}
